package my.app;

import java.util.ArrayList;

import my.app.company.Company;
import my.app.company.CompanyRowAdapter;
import my.app.company.CompanyRowView;
import my.app.taxi.Taxi;
import my.app.taxi.TaxiRowAdapter;
import my.app.taxi.TaxiRowView;
import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;



public class FavTabView extends Activity{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.taxi_tab_view);
        ServiceClient client = ServiceClient.getInstance(getApplicationContext());
        ArrayList<CompanyRowView> items = new ArrayList<CompanyRowView>();
        
        
        for (Company c : client.getFavorites()) {
        	items.add(new CompanyRowView(this, null, c,1));
        }
        
        
        
        
        
        
        
        
        CompanyRowAdapter aa = new CompanyRowAdapter(this, R.layout.taxi_list_row, items);
        ListView ll = (ListView) findViewById(R.id.taxi_list);
        ll.setAdapter(aa);
        
        
        
    }
    
    
}